<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><#if op??><#if op="view">查看<#elseif op="edit">修改</#if><#else>新增</#if>分类</title>
	<link href="/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="place">
    	<span>位置：</span>
	    <ul class="placeul"><li><a href="/index.html">首页</a></li><li><#if op??><#if op="view">查看<#elseif op="edit">修改</#if><#else>新增</#if>分类</li></ul>
    </div>
    <br><br>
	<form action="/ware/category/save.html" method="post">
		<input name="id" type="hidden" value="${(category.id)!""}">
	    <ul class="forminfo">
		    <li>
		    	<label>分类名称：</label>
		    	<input name="name" type="text" class="scinput input-lg" value="${(category.name)!""}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" 
		    		data-easyform="length:2 15;char-chinese;real-time;" data-message="分类名称不能为空，且长度为2~15个字符" />
		    	<i><font class="font-red">*</font>分类名称不能为空，长度为2~12个汉字、英文、下划线或中文符号</i>
		    </li>
		    <li>
		    	<label> 显示顺序：</label>
		    	<input name="displayOrder" type="text" class="scinput input-lg" value="${(category.displayOrder)!1}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" 
		    		data-easyform="null;uint:1 99999;real-time;" data-message="显示顺序取值范围为1~99999" />
		    	<i><font class="font-red">*</font>倒序显示。1为显示在最后。此顺序相同的则以更新时间倒序显示</i>
		    </li>
		    <li>
		    	<label>状态：</label>
		    	<input name="status" type="radio" value="1" selected="selected" <#if op?? && op="view">disabled=true</#if> autocomplete="off" data-message="请选择状态">开启&ensp;<input name="status" type="radio" value="2" <#if op?? && op="view">disabled=true</#if> autocomplete="off">关闭
		    	<i><font class="font-red">*</font>选择关闭后，此分类在前端分类展示页面不可见。但是数据还是可以被搜索和查看</i>
		    </li>
		    <li>
		    	<label>父级分类：</label>
				<input name="parentName" type="hidden" value="${(category.parentName)!""}" easyform="null;date;real-time;" message="分类不能为空！" easytip="disappear:lost-focus;"/>
		    	<select class="select-form" name="parentId">
				    <option value="">选择所属分类</option>
				    <#if categoryAll??><#list categoryAll as item>
				    <option value=${item.id} <#if (category.id)?? && (category.id)?number == item.id>selected="selected"</#if>>${item.name}</option>
				    </#list></#if>
			    </select>
		    	<i>选择所属分类，如果为顶级分类，则不选</i>
		    </li>
		    <li>
		    	<label>备&emsp;&emsp;注：</label>
		    	<input name="description" type="text" class="scinput input-lg" value="${(category.description)!""}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" data-easyform="null"/>
		    </li>
		    <li>
		    	<label>&nbsp;</label>
		    	<#if !op?? || op!="view">
		    	<input id="submitBtn" type="submit" class="btn" value="提交"/>&emsp;
		    	</#if>
		    	<input id="cancelBtn" type="button" class="btn" value="返回"/>
		    </li>
	    </ul>
	</form>
</body>
<script type="text/javascript" src="/js/jquery-1.10.1.min.js"></script>
<link href="/js/ext/easyform/easyform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/ext/easyform/easyform.js"></script>
<script type="text/javascript" src="/js/commonAdd.js"></script>
<script>
	selectChangeValue("parentId", "parentName");
</script>
</html>